feat: isolate receiver/sender loop from the app-server#11313
feat: isolate receiver/sender loop from the app-server#11313
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5cba950f25
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Err(mpsc::error::TrySendError::Full(_)) => { | ||
| break; | ||
| } |
There was a problem hiding this comment.
Keep retrying deferred close events when queue is full
When try_send(TransportEvent::ConnectionClosed { .. }) returns Full, this branch just breaks and retries only after another outbound/control event arrives. If the queue later drains while the server is otherwise idle, the deferred close is never delivered, leaving a stale connection in the processor (and in stdio mode this can prevent shutdown_when_no_connections from ever triggering). This close-notification path needs a retry mechanism that does not depend on new outbound traffic.
Useful? React with 👍 / 👎.
| Err(mpsc::error::TrySendError::Full(_)) => { | ||
| break; | ||
| } |
To avoid deadlock on back-pressure we isolate sending/receiving loops in the
app-serveran introduce a new error if thesendingqueue is full